package com.jcl.elasticsearch.resume.po;

import com.jcl.core.utils.DateUtils;
import com.jcl.elasticsearch.resume.model.*;
import com.jcl.elasticsearch.resume.ResumeBasicEntity;

import java.util.List;

/**
 * @ClassName ResumeCrawlerExportParam
 * @Description TODO
 * @Author yyliu
 * @Date 2018/11/13 16:05
 * @Version 1.0
 **/
public class ResumeResultEntity extends ResumeBasicEntity {

    // 个人基本信息
    private SearchResumePersInfo basicInfo;
    // 求职意向
    private SearchResumeJobIntention jobIntention;
    // 自我介绍
    private SearchResumeSelfEvaluation selfEvaluation;

    private List<SearchResumeWork> works;

    private List<SearchResumeProject> projects;

    private List<SearchResumeEdu> educations;

    public SearchResumePersInfo getBasicInfo() {
        return basicInfo;
    }

    public void setBasicInfo(SearchResumePersInfo basicInfo) {
        this.basicInfo = basicInfo;
    }

    public SearchResumeJobIntention getJobIntention() {
        return jobIntention;
    }

    public void setJobIntention(SearchResumeJobIntention jobIntention) {
        this.jobIntention = jobIntention;
    }

    public SearchResumeSelfEvaluation getSelfEvaluation() {
        return selfEvaluation;
    }

    public void setSelfEvaluation(SearchResumeSelfEvaluation selfEvaluation) {
        this.selfEvaluation = selfEvaluation;
    }

    public List<SearchResumeWork> getWorks() {
        return works;
    }

    public void setWorks(List<SearchResumeWork> works) {
        this.works = works;
    }

    public List<SearchResumeProject> getProjects() {
        return projects;
    }

    public void setProjects(List<SearchResumeProject> projects) {
        this.projects = projects;
    }

    public List<SearchResumeEdu> getEducations() {
        return educations;
    }

    public void setEducations(List<SearchResumeEdu> educations) {
        this.educations = educations;
    }

    public Long getUpdateDateTime(){
        if(null != updateDate){
            return updateDate.getTime();
        }
        return null;
    }

    public Long getApplyDateTime(){
        if(null != applyDate){
            return applyDate.getTime();
        }
        return null;
    }

    public String getUpdateDateStr(){
        if(null != updateDate){
            return DateUtils.format(updateDate, DateUtils.DATE_FORMAT_YMD);
        }
        return null;
    }

    public String getApplyDateStr(){
        if(null != applyDate){
            return DateUtils.format(applyDate, DateUtils.DATE_FORMAT_YMD);
        }
        return null;
    }
}
